import { defineStore } from 'pinia'
import { reactive, computed } from 'vue'

export const useUserStore = defineStore('user', () => {

    const userInfo = reactive({
        user: {},
        login:{}
    })
    const curLoginUser = computed(() => {
        return userInfo.user
    })

    function setUserInfo(xxx) {

        userInfo.user = xxx    
    }
    function setUserLoging(loginInfo){
        userInfo.login= loginInfo
    }
    return {curLoginUser,setUserInfo,setUserLoging}
})